Clamping device and clamping method

ABSTRACT

An optical black portion in an output of a CCD image pickup device is extracted and a clamp level of each line is obtained by an integrating and averaging circuit. A difference value of the clamp levels between the front and rear lines and an absolute value of the difference are calculated by a comparing circuit. Either the clamp level of each line or the clamp level updated every (+1) or (−1) is selected by a selector in accordance with whether the absolute value of the difference of the clamp levels between the front and rear lines lies within a predetermined range or not. The clamp level which is outputted from the selector is subtracted from the output of the CCD image pickup device.

TECHNICAL FIELD

The invention relates to a clamping apparatus and a clamping methodwhich are suitable when they are used to clamp an output of an opticalblack portion in an image pickup output of a CCD image pickup device toa black level in, for example, a digital still camera, a digital videocamera, or the like.

BACKGROUND ART

In a video camera, a CCD (Charge Coupled Device) image pickup device isused as an image pickup device. Not only a photoelectric conversionoutput which is caused when the light is irradiated onto a photosensingsurface of the CCD image pickup device but also a component of a darkcurrent which is caused when no light is irradiated are included in anoutput of the CCD image pickup device. Therefore, an optical blackportion is provided for the CCD image pickup device and a process forsetting an output of the optical black portion to a black level isperformed.

That is, a masking region 21 is provided for the CCD image pickup deviceas shown in FIG. 1. The masking region 21 is perfectly shielded againstthe light and the portion of the masking region 21 becomes an opticalblack. A signal of the masking region 21 is outputted as an opticalblack portion from the CCD image pickup device at a head timing of everyline. Only a component of the dark current is outputted from the opticalblack portion. A clamp level is obtained from the output of the opticalblack portion. The clamp level formed by extracting the optical blackportion is subtracted from the image pickup output of the CCD imagepickup device. Thus, the optical black portion in the output of the CCDimage pickup device is clamped so as to be set to the black level(namely, 0 level). Thus, the dark current is removed and only thephotoelectric conversion output can be extracted.

Hitherto, the clamping circuit for setting the optical black portion inthe output of the CCD image pickup device to the black level has such aconstruction that the clamp level is obtained from a signal of anoptical black portion in an output of a CCD image pickup device 102 by amicrocomputer 106 for a camera as shown in FIG. 2.

In FIG. 2, reference numeral 101 denotes a lens portion. The lensportion 101 has a zoom lens, a focusing lens, an aperture mechanism, itsdriving circuit, and the like. An image pickup portion is constructed bythe lens portion 101 and CCD image pickup device 102. Object image lighttransmitted through the lens portion 101 is formed as an image onto aphotosensing surface of the CCD image pickup device 102.

As shown in FIG. 1, the masking region 21 serving as an optical blackportion is provided for the CCD image pickup device 102. The output ofthe CCD image pickup device 102 is supplied to a sample and hold and AGCcircuit 103. The output of the CCD image pickup device 102 is sampledand held and amplified to a predetermined level by the sample and holdand AGC circuit 103. An output of the sample and hold and AGC circuit103 is supplied to an A/D converting circuit 104. The image pickupsignal of the CCD image pickup device 102 is converted into a digitalsignal by the A/D converting circuit 104.

An output of the A/D converting circuit 104 is supplied to a subtractor107 and supplied to a detecting circuit 105. A clamp pulse forextracting an optical black level (namely, masking region 21) in thehead portion of each line is supplied to the detecting circuit 105 froman input terminal 110. The head optical black level of each line isextracted by the detecting circuit 105 and its level is detected. Thehead optical black level is supplied to the microcomputer 106.

The microcomputer 106 integrates detection results of the optical blacklevels of a plurality of lines and calculates an average clamp level.The average clamp level calculated by the microcomputer 106 is suppliedto the subtractor 107. In the subtractor 107, the clamp level obtainedby the microcomputer 106 is subtracted from the output of the A/Dconverting circuit 104. Thus, the optical black level of the CCD imagepickup device 102 is clamped to “0”.

An output of the subtractor 107 is supplied to a luminance signalseparating circuit 108 and a chroma signal separating circuit 109 of acamera signal processing circuit 114. In the luminance signal separatingcircuit 108, a luminance signal is separated and a process for theluminance signal is performed. An output of the luminance signalseparating circuit 108 is outputted from an output terminal 111. In thechroma signal separating circuit 109, a chroma signal is separated and aprocess for the chroma signal is performed. An output of the chromasignal separating circuit 109 is outputted from an output terminal 112.

As mentioned above, hitherto, the detecting circuit 105 extracts theoptical black portions of a plurality of lines and detects their levels.In the microcomputer 106, the average clamp level is calculated from thedetection results of the optical black levels of a plurality of lines.In the subtractor 107, the clamp level formed by averaging the detectionresults of the optical black levels of a plurality of lines issubtracted from the output of the CCD image pickup device 102. In thismanner, the clamping circuit is constructed.

However, when the microcomputer 106 obtains the clamp level as mentionedabove, the processes of the microcomputer 106 are occupied for such aperiod of time and become a burden when the other processes are executedby the microcomputer 106.

It is, therefore, considered that the clamping circuit for setting thelevel of the optical black portion of the CCD image pickup device 102 tothe black level is constructed by hardware. In this case, it is possibleto construct so as to calculate the clamp level by using the detectionresult of the optical black level of each line. By using such aconstruction, the clamp level fluctuates every line and a problem of theoccurrence of a line flicker occurs. It is, therefore, necessary toobtain the clamp level by averaging the detection results of the opticalblack levels of a plurality of lines. However, to average the detectionresults of the optical black levels of a plurality of lines, a circuitfor storing the optical black levels of respective lines and averagingthose levels is necessary, so that the circuit scale increases.

It is, therefore, an object of the invention to provide a clampingapparatus and a clamping method which can solve the above problems.

DISCLOSURE OF INVENTION

To solve the above problems, according to the invention, there isprovided a clamping apparatus comprising: a circuit for masking a partof a solid state image pickup device and photoelectrically converting asignal of a dark current component which is outputted from the solidstate image pickup device and corresponds to a masking portion and aphotosignal which is outputted from the solid state image pickup deviceand corresponds to a non-masking portion; an integrating portion forsampling and integrating the dark current component signal correspondingto the masking portion every line; an averaging portion for averaging anintegration value which is obtained by the integrating portion; acomparing portion for comparing an average value of each line averagedby the averaging portion, thereby detecting a change state of theaverage value; a clamp level control portion for holding the averagevalue when a comparison result of the comparing portion lies within apredetermined range and changing the average value so as to have apredetermined gradation when the comparison result of the comparingportion is out of the predetermined range; and a subtracting portion forsubtracting the average value derived from the clamp level controlportion from an output of the photoelectric converting circuit, whereinthe signal is clamped on the basis of the signal of the dark currentcomponent that is outputted from the solid state image pickup device.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is an explanatory diagram of a masking region of a CCD imagepickup device; FIG. 2 is a block diagram for explaining a conventionalclamping circuit; FIG. 3 is a block diagram showing a whole constructionof an embodiment; FIG. 4A is a waveform diagram for explaining asampling clock in the embodiment; FIG. 4B is a waveform diagram forexplaining a horizontal drive pulse signal in the embodiment; and FIG.4C is a waveform diagram for explaining a clamp pulse in the embodiment.

BEST MODE FOR CARRYING OUT THE INVENTION

An embodiment of the invention will now be described hereinbelow withreference to the drawings. In FIG. 3, reference numeral 1 denotes a CCDimage pickup device. A masking region set to an optical black level isprovided for the CCD image pickup device 1. Object image light is formedas an image onto the photosensing surface of the CCD image pickup device1. An output of the CCD image pickup device 1 is supplied to a sampleand hold and AGC circuit 2.

In the sample and hold and AGC circuit 2, the output of each CCD imagepickup device 1 is sampled and held and amplified to a predeterminedlevel. An output of the sample and hold and AGC circuit 2 is supplied toan A/D converting circuit 3. In the A/D converting circuit 3, in case ofthe NTSC system, an input signal is quantized by 4 fsc (fsc denotes acolor subcarrier frequency: 3.58 MHz) and a digital image pickup signalof, for example, 10 bits per sample is formed. The digital image pickupsignal formed by the A/D converting circuit 3 is supplied to asubtractor 17 of a clamping circuit 4 and supplied to a gate circuit 5.

The clamping circuit 4 clamps an output of an optical black portion ofthe CCD image pickup device 1 to a black level. The clamping circuit 4is constructed by the gate circuit 5, an integrating and averagingcircuit 6, a comparing circuit 10, a subtractor 14, an adder 15, asubtractor 17, and a selector 16.

A clamp pulse is supplied to the gate circuit 5 from an input terminal19. The clamp pulse is generated in the optical black portion of the CCDimage pickup device 1. The optical black portion in the output of theCCD image pickup device 1 is extracted by the gate circuit 5.

The integrating and averaging circuit 6 is constructed by an adder 7, adelay circuit 8, and a 1/N multiplier 9. An output of the gate circuit 5is supplied to the adder 7. An output of the adder 7 is supplied to theadder 7 via the delay circuit 8 and integrated. This integration outputis supplied to the 1/N multiplier 9 and averaged. The integrating andaveraging circuit 6 averages the output, every line, corresponding tothe optical black portion in the output of the CCD image pickup device 1extracted by the gate circuit 5, thereby obtaining the clamp level ofeach line.

The comparing circuit 10 is constructed by a subtractor 12, a delaycircuit 11, and an absolute value circuit 13. The comparing circuit 10calculates an absolute value of a difference of the clamp levels betweenthe front and rear lines. An output of the integrating and averagingcircuit 6 is supplied to the subtractor 12 and delayed by the delaycircuit 11 and supplied to the subtractor 12. The difference of theclamp levels between the front and rear lines is obtained by thesubtractor 12. An output of the subtractor 12 is supplied to theabsolute value circuit 13 and the absolute value of the difference ofthe clamp levels between the front and rear lines is obtained by theabsolute value circuit 13. A control signal to the selector 16 is formedby whether the absolute value of the difference of the clamp levelsbetween the front and rear lines lies within a predetermined range ornot.

The selector 16 has three input terminals 16 a, 16 b, and 16 c. Theclamp level of each line from the integrating and averaging circuit 6 issupplied as it is to the input terminal 16 a of the selector 16. Theclamp level of each line to which “1” has been added is supplied to theinput terminal 16 b. The clamp level of each line from which “1” hasbeen subtracted is supplied to the input terminal 16 c. The selector 16selects one of the inherent clamp level of each line, the clamp level ofeach line to which “1” has been added, and the clamp level of each linefrom which “1” has been subtracted on the basis of an output of thecomparing circuit 10.

As shown in FIG. 4C, the portion corresponding to the optical black inthe output of the CCD image pickup device 1 is extracted by the gatecircuit 5 in response to the clamp pulse from the input terminal 19.

That is, as shown in FIGS. 4A and 4C, the output before time t₁, in theoutput of the CCD image pickup device 1 corresponds to a valid region ofthe previous line, the output within a range from time t₁ to time t₂corresponds to an ignorance region, and the output within a range fromtime t₂ to time t₄ corresponds to a region of the optical black. FIG. 4Ashows a sampling clock. FIG. 4B shows a horizontal drive pulse signal.FIG. 4C shows a clamp pulse. As shown in FIG. 4C, the clamp pulse isgenerated within a range from time t₂ to time t₃ in the optical black.The signal within this range from time t₃ to time t₃ is extracted by thegate circuit 5.

The clamp levels are averaged by the integrating and averaging circuit 6for a period of time within the range from time t₂ to time t₃ in theoptical black. Thus, the clamp level clamp[n] of each line is obtained.

The clamp level clamp[n] of each line which is outputted from theintegrating and averaging circuit 6 is supplied to the input terminal 16a of the selector 16 as it is. “1” is added to the clamp level clamp[n]by the adder 15 and a resultant level is supplied to the input terminal16 b. “1” is subtracted from the clamp level clamp[n] by the subtractor14 and a resultant level is supplied to the input terminal 16 c. Theclamp level clamp[n] of each line which is outputted from theintegrating and averaging circuit 6 is supplied to the comparing circuit10.

The comparing circuit 10 calculates a difference value diff of the clamplevels between the front and rear lines. The comparing circuit 10calculates an absolute value abs of the difference of the clamp levelsbetween the front and rear lines. The absolute value abs is comparedwith a predetermined specified value m, thereby forming a control signalto the selector 16.

Specifically speaking, the absolute value abs is calculated by theabsolute value circuit 13 from the difference diff of the clamp levelsbetween the front and rear lines. The absolute value abs of thedifference diff of the clamp levels is obtained by the followingequation (1).

abs=|clamp[n+1]−clamp[n]|  (1)

In the absolute value circuit 13, the absolute value abs is comparedwith the specified value m.

When there is a relation (abs≦m) between the absolute value abs and thespecified value m, the input terminal 16 a is selected. In thisinstance, the clamp level is not updated but the clamp level clamp[n] ofeach line which is outputted from the integrating and averaging circuit6 is supplied as it is to the subtractor 17 via the selector 16.

When there is a relation (abs>m) between the absolute value abs and thespecified value m and when the difference diff of the clamp levels is(diff>0), the input terminal 16 b is selected. In this instance, “1” isadded by the adder 15 to the clamp level clamp[n] of each line which isoutputted from the integrating and averaging circuit 6 and a resultantlevel is supplied as it is to the subtractor 17 via the selector 16.

Further, when there is a relation (abs>m) between the absolute value absand the specified value m and when the difference diff of the clamplevels is (diff<0), the input terminal 16 c is selected. In thisinstance, the clamp level is not updated but “1” is subtracted by thesubtractor 14 to the clamp level clamp[n] of each line which isoutputted from the integrating and averaging circuit 6 and a resultantlevel is supplied as it is to a subtracting terminal of the subtractor17 via the selector 16.

As mentioned above, the clamp level of each line which is outputted fromthe integrating and averaging circuit 6 is used as it is if the absolutevalue of the difference of the clamp levels between the front and rearlines lies within the predetermined range, and if the absolute valueexceeds the predetermined range, the clamp level is updated every (+1)or (−1). Thus, the optimum clamp level is outputted from the output ofthe selector 16.

The output of the selector 16 is supplied to the subtractor 17. Theoutput of the selector 16 is subtracted from the output of the A/Dconverting circuit 3 by the subtractor 17. Thus, the clamping process isexecuted so as to set the optical black portion of the CCD image pickupdevice 1 to the 0 level.

As mentioned above, in the embodiment of the invention, whether theabsolute value of the difference of the clamp levels between the frontand rear lines lies within the predetermined range or not isdiscriminated. If the absolute value of the difference of the clamplevels between the front and rear lines lies within the predeterminedrange, the clamp level is used as it is. If the absolute value is largerthan the predetermined range, the clamp level is updated every (+1) or(−1), so that the clamp level is raised or dropped. Therefore, even ifthere is a fluctuation in the clamp level of each line, the clamp leveldoes not suddenly fluctuates. Therefore, no line flicker occurs in spiteof the fact that the clamp level of each line is used.

The invention can be easily applied to another clamping circuit of avideo signal such as pedestal clamp, sync chip clamp, or the like.

Although the embodiment of the invention has been described with respectto the case of the construction by the hardware, the clamp circuit canbe realized by software.

Further, although the embodiment of the invention has been describedwith respect to the construction in which “−1” is added to the averagedclamp level by the subtractor 14 at the front stage of the selector 16and “+1” is added to the averaged clamp level by the adder 15, a changewidth can be set as necessary. The change width can be alsoautomatically varied on the basis of control information of thecomparing circuit 10.

According to the invention, the clamp level of each line is obtainedfrom the signal of the optical black portion of the CCD image pickupdevice every line, and on the basis of whether the absolute value of thedifference of the clamp levels between the front and rear lines lieswithin the predetermined range or not, either the clamp level of eachline or the clamp level updated every (+1) or (−1) is selected.Therefore, in the case where the fluctuation of the clamp level of eachline is small, the clamp level does not fluctuate. Even if the clamplevel fluctuates, it is changed gradually every (+1) or (−1). Therefore,in spite of the fact that the clamp level of each line is used, no lineflicker occurs. Since the clamp level of each line is used, there is noneed to average the clamp levels of a plurality of lines and theinvention can be realized by simple hardware.

INDUSTRIAL APPLICABILITY

As mentioned above, the clamping apparatus and clamping method accordingto the invention are suitable when they are used to clamp the output ofthe optical black portion in the image pickup output of the CCD imagepickup device to the black level, for example, in the digital stillcamera, digital video camera, or the like.

What is claimed is:
 1. A clamping apparatus comprising: means formasking a part of a solid state image pickup device andphotoelectrically converting a signal of a dark current component whichis outputted from said solid state image pickup device and correspondsto a masking portion and a photosignal which is outputted from saidsolid state image pickup device and corresponds to a non-maskingportion; integrating means for sampling and integrating said darkcurrent component signal corresponding to said masking portion everyline; averaging means for averaging an integration value which isobtained by said integrating means; comparing means for comparing anaverage value of each line averaged by said averaging means, therebydetecting a change state of said average value; clamp level controlmeans for holding the average value when a comparison result of saidcomparing means lies within a predetermined range and changing theaverage value so as to have a predetermined gradation when saidcomparison result of said comparing means is out of said predeterminedrange; and subtracting means for subtracting said average value derivedfrom said clamp level control means from an output of said photoelectricconverting means, wherein the signal is clamped on the basis of thesignal of the dark current component that is outputted from said solidstate image pickup device.
 2. An apparatus according to claim 1, furthercomprising setting means which can arbitrarily set said predeterminedgradation at a time when said average value is changed by said clamplevel control means.
 3. A clamping method comprising the steps of:masking a part of a solid state image pickup device andphotoelectrically converting a signal of a dark current component whichis outputted from said solid state image pickup device and correspondsto a masking portion and a photosignal which is outputted from saidsolid state image pickup device and corresponds to a non-maskingportion; sampling and integrating said dark current component signalcorresponding to said masking portion every line; averaging anintegration value; comparing an average value of each line, therebydetecting a change state of said average value; holding the averagevalue when a comparison result lies within a predetermined range andchanging the average value so as to have a predetermined gradation whensaid comparison result is out of said predetermined range; andsubtracting said average value changed so as to have said predeterminedgradation from said photoelectrically converted output, wherein thesignal is clamped on the basis of the signal of the dark currentcomponent that is outputted from said solid state image pickup device.